package individual.ircon.bilibili.bean;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.util.List;

/**
 * 根据 https://api.live.bilibili.com/xlive/web-room/v1/index/getDanmuInfo?id=%s&type=0 自动生成地json bean
 */
public class DanmuInfo implements Serializable {

    @JSONField(name = "code")
    private Integer code;
    @JSONField(name = "message")
    private String message;
    @JSONField(name = "ttl")
    private Integer ttl;
    @JSONField(name = "data")
    private Data data;

    public static class Data implements Serializable {

        @JSONField(name = "group")
        private String group;
        @JSONField(name = "business_id")
        private Integer businessId;
        @JSONField(name = "refresh_row_factor")
        private Double refreshRowFactor;
        @JSONField(name = "refresh_rate")
        private Integer refreshRate;
        @JSONField(name = "max_delay")
        private Integer maxDelay;
        @JSONField(name = "token")
        private String token;
        @JSONField(name = "host_list")
        private List<HostList> hostList;

        public String getGroup() {
            return group;
        }

        public void setGroup(String group) {
            this.group = group;
        }

        public Integer getBusinessId() {
            return businessId;
        }

        public void setBusinessId(Integer businessId) {
            this.businessId = businessId;
        }

        public Double getRefreshRowFactor() {
            return refreshRowFactor;
        }

        public void setRefreshRowFactor(Double refreshRowFactor) {
            this.refreshRowFactor = refreshRowFactor;
        }

        public Integer getRefreshRate() {
            return refreshRate;
        }

        public void setRefreshRate(Integer refreshRate) {
            this.refreshRate = refreshRate;
        }

        public Integer getMaxDelay() {
            return maxDelay;
        }

        public void setMaxDelay(Integer maxDelay) {
            this.maxDelay = maxDelay;
        }

        public String getToken() {
            return token;
        }

        public void setToken(String token) {
            this.token = token;
        }

        public List<HostList> getHostList() {
            return hostList;
        }

        public void setHostList(List<HostList> hostList) {
            this.hostList = hostList;
        }

        public static class HostList implements Serializable {
            /**
             * host : hw-sh-live-comet-01.chat.bilibili.com
             * port : 2243
             * wss_port : 443
             * ws_port : 2244
             */

            @JSONField(name = "host")
            private String host;
            @JSONField(name = "port")
            private Integer port;
            @JSONField(name = "wss_port")
            private Integer wssPort;
            @JSONField(name = "ws_port")
            private Integer wsPort;

            public String getHost() {
                return host;
            }

            public void setHost(String host) {
                this.host = host;
            }

            public Integer getPort() {
                return port;
            }

            public void setPort(Integer port) {
                this.port = port;
            }

            public Integer getWssPort() {
                return wssPort;
            }

            public void setWssPort(Integer wssPort) {
                this.wssPort = wssPort;
            }

            public Integer getWsPort() {
                return wsPort;
            }

            public void setWsPort(Integer wsPort) {
                this.wsPort = wsPort;
            }
        }
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getTtl() {
        return ttl;
    }

    public void setTtl(Integer ttl) {
        this.ttl = ttl;
    }

    public Data getData() {
        return data;
    }

    public void setData(Data data) {
        this.data = data;
    }
}
